/**
 * MoveType.as
 * Copyright 2014 Qunhe Tech, all rights reserved.
 * Qunhe PROPRIETARY/CONFIDENTIAL, any form of usage is subject to approval.
 */
package org.bridge.flash.hi2048.model.constants
{

    /**
     * use keycode to define four operations
     * @author zhangshuai
     * @see http://help.adobe.com/zh_CN/AS2LCR/Flash_10.0/help.html?content=00000525.html
     */
    public class OperationType
    {
        public static const LEFT:int = 37;
        public static const UP:int = 38;
        public static const RIGHT:int = 39;
        public static const DOWN:int = 40;

        public function OperationType()
        {
        }

        public static function isOperationType(keyCode:int):Boolean
        {
            return keyCode == LEFT || keyCode == UP || keyCode == RIGHT || keyCode == DOWN;
        }
    }
}
